<!doctype html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<title>学生选课管理系统</title>
		<meta name="renderer" content="webkit|ie-comp|ie-stand">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<link rel="stylesheet" href="./static/css/font.css">
		<link rel="stylesheet" href="./static/css/weadmin.css">
		<script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
		<script src="../../static/js/jquery-1.11.1.min.js"></script>
	</head>

	<body>
		<!-- 顶部开始 -->
		<div class="container">
			<div class="logo">
				<a href="./index.html">选课管理系统</a>
			</div>
			<div class="left_open">
				<i title="展开左侧栏" class="iconfont">&#xe699;</i>
			</div>
			<ul class="layui-nav right" lay-filter="">
				<li class="layui-nav-item">
					<a href="javascript:;" id="loginname">Admin</a>
					<dl class="layui-nav-child">
						<!-- 二级菜单 -->
						<dd>
							<a onclick="WeAdminShow('个人信息','pages/person/introduce.html')">个人信息</a>
						</dd>
						<dd>
							<a onclick="WeAdminShow('切换帐号','./login.html')">切换帐号</a>
						</dd>
						<dd>
							<a id="loginout">退出</a>
						</dd>
					</dl>
				</li>
			</ul>
		</div>
		<!-- 顶部结束 -->
		<!-- 中部开始 -->
		<!-- 左侧菜单开始 -->
		<div class="left-nav">
			<div id="side-nav">
				<ul id="nav">
					<li id="student" style="display: none">
						<a href="javascript:;">
							<i class="iconfont">&#xe6b8;</i>
							<cite>学生管理</cite>
							<i class="iconfont nav_right">&#xe697;</i>
						</a>
						<ul class="sub-menu">
							<li>
								<a _href="./pages/student/studentList.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>学生列表</cite>

								</a>
							</li>

                            <!--<li>
                                <a _href="./pages/student/add.html">
                                    <i class="iconfont">&#xe6a7;</i>
                                    <cite>学生添加</cite>

                                </a>
                            </li>-->
						</ul>
					</li>

					<li id="studentOp" style="display: none">
						<a href="javascript:;">
							<i class="iconfont">&#xe6b8;</i>
							<cite>学生操作</cite>
							<i class="iconfont nav_right">&#xe697;</i>
						</a>
						<ul class="sub-menu">
							<li>
								<a _href="./pages/schedule/chooseCourse.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>选课信息</cite>
								</a>
							</li>
							<li>
								<a _href="./pages/student/studentDel.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>我的课程</cite>

								</a>
							</li>
						</ul>
					</li>
					<li id="teacherOp" style="display: none">
						<a href="javascript:;">
							<i class="iconfont">&#xe6b8;</i>
							<cite>教师操作</cite>
							<i class="iconfont nav_right">&#xe697;</i>
						</a>
						<ul class="sub-menu">
							<li>
								<a _href="./pages/teacher/teacher.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>授课信息</cite>
								</a>
							</li>
						</ul>
					</li>

					<li id="teacher" style="display: none">
						<a href="javascript:;">
							<i class="iconfont">&#xe6b8;</i>
							<cite>教师管理</cite>
							<i class="iconfont nav_right">&#xe697;</i>
						</a>
						<ul class="sub-menu">
							<li>
								<a _href="./pages/teacher/teacherList.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>教师列表</cite>
								</a>
							</li>
							<!--<li>
								<a _href="./pages/teacher/add.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>教师添加</cite>
								</a>
							</li>-->
						</ul>
					</li>
					<li id="course" style="display: none">
						<a href="javascript:;">
							<i class="iconfont">&#xe705;</i>
							<cite>课程管理</cite>
							<i class="iconfont nav_right">&#xe697;</i>
						</a>
						<ul class="sub-menu">
							<li>
								<a _href="./pages/course/courseList.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>课程列表</cite>
								</a>
							</li>
							<li>
								<a _href="./pages/schedule/planCourse.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>排课操作</cite>
								</a>
							</li>
						</ul>
					</li>
					<li id="department" style="display: none">
						<a href="javascript:;">
							<i class="iconfont">&#xe723;</i>
							<cite>学院管理</cite>
							<i class="iconfont nav_right">&#xe697;</i>
						</a>
						<ul class="sub-menu">
							<li>
								<a _href="./pages/department/list.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>学院列表</cite>
								</a>
							</li>
                            <!--<li>
                                <a _href="./pages/department/add.html">
                                    <i class="iconfont">&#xe6a7;</i>
                                    <cite>学院添加</cite>
                                </a>
                            </li>-->
						</ul>
					</li>
					<li id="gradeClass" style="display: none">
						<a href="javascript:;">
							<i class="iconfont">&#xe723;</i>
							<cite>班级管理</cite>
							<i class="iconfont nav_right">&#xe697;</i>
						</a>
						<ul class="sub-menu">
							<li>
								<a _href="./pages/classgrade/list.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>班级列表</cite>
								</a>
							</li>
                           <!-- <li>
                                <a _href="./pages/classgrade/add.html">
                                    <i class="iconfont">&#xe6a7;</i>
                                    <cite>班级添加</cite>
                                </a>
                            </li>-->
						</ul>
					</li>
					<li id="auth" style="display: none">
						<a href="javascript:;">
							<i class="iconfont">&#xe726;</i>
							<cite>权限管理</cite>
							<i class="iconfont nav_right">&#xe697;</i>
						</a>
						<ul class="sub-menu">
							<li>
								<a _href="./pages/admin/list.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>用户管理</cite>
								</a>
							</li>
							<li>
								<a _href="./pages/admin/roleList.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>角色管理</cite>
								</a>
							</li>
							<li>
								<a _href="./pages/admin/resourceList.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>资源管理</cite>
								</a>
							</li>
							<!--<li>-->
								<!--<a _href="./pages/admin/rule.html">-->
									<!--<i class="iconfont">&#xe6a7;</i>-->
									<!--<cite>权限管理</cite>-->
								<!--</a>-->
							<!--</li>-->
						</ul>
					</li>
					<li id="log" style="display: none">
						<a href="javascript:;">
							<i class="iconfont">&#xe6ce;</i>
							<cite>系统统计</cite>
							<i class="iconfont nav_right">&#xe697;</i>
						</a>
						<ul class="sub-menu">
							<li>
								<a _href="./pages/accesslog/list.html">
									<i class="iconfont">&#xe6a7;</i>
									<cite>日志统计</cite>
								</a>
							</li>
							<!--<li>
                                    <a _href="./pages/echarts/echarts2.html">
                                        <i class="iconfont">&#xe6a7;</i>
                                        <cite>柱状图</cite>
                                    </a>
                                </li>
                                <li>
                                    <a _href="./pages/echarts/echarts3.html">
                                        <i class="iconfont">&#xe6a7;</i>
                                        <cite>地图</cite>
                                    </a>
                                </li>
                                <li>
                                    <a _href="./pages/echarts/echarts4.html">
                                        <i class="iconfont">&#xe6a7;</i>
                                        <cite>饼图</cite>
                                    </a>
                                </li>
                                <li>
                                    <a _href="./pages/echarts/echarts5.html">
                                        <i class="iconfont">&#xe6a7;</i>
                                        <cite>雷达图</cite>
                                    </a>
                                </li>
                                <li>
                                    <a _href="./pages/echarts/echarts6.html">
                                        <i class="iconfont">&#xe6a7;</i>
                                        <cite>k线图</cite>
                                    </a>
                                </li>
                                <li>
                                    <a _href="./pages/echarts/echarts7.html">
                                        <i class="iconfont">&#xe6a7;</i>
                                        <cite>热力图</cite>
                                    </a>
                                </li>
                                <li>
                                    <a _href="./pages/echarts/echarts8.html">
                                        <i class="iconfont">&#xe6a7;</i>
                                        <cite>仪表图</cite>
                                    </a>
                                </li>
                                <li>
                                    <a _href="./pages/echarts/echarts9.html">
                                        <i class="iconfont">&#xe6a7;</i>
                                        <cite>地图DIY实例</cite>
                                    </a>
                                </li>-->
						</ul>
					</li>
				</ul>
			</div>
		</div>
		<!-- <div class="x-slide_left"></div> -->
		<!-- 左侧菜单结束 -->
		<!-- 右侧主体开始 -->
		<div class="page-content">
			<div class="layui-tab tab" lay-filter="wenav_tab" id="WeTabTip" lay-allowclose="true">
				<ul class="layui-tab-title" id="tabName">
					<li>我的桌面</li>
				</ul>
				<div class="layui-tab-content">
					<div class="layui-tab-item layui-show">
						<iframe src='./pages/welcome.html' frameborder="0" scrolling="yes" class="weIframe"></iframe>
					</div>
				</div>
			</div>
		</div>
		<div class="page-content-bg"></div>
		<!-- 右侧主体结束 -->
		<!-- 中部结束 -->
		<!-- 底部开始 -->
		<div class="footer">
			<div class="copyright">Copyright ©2019 scs</div>
		</div>
		<script src="static/js/common.js" charset="utf-8"></script>

		<!-- 底部结束 -->
		<script type="text/javascript">
//			layui扩展模块的两种加载方式-示例
//		    layui.extend({
//			  admin: '{/}../../static/js/admin' // {/}的意思即代表采用自有路径，即不跟随 base 路径
//			});
//			//使用拓展模块
//			layui.use('admin', function(){
//			  var admin = layui.admin;
//			});
			layui.config({
			  base: './static/js/'
			  ,version: '101100'
			}).use('admin');
			layui.use(['jquery','admin'], function(){
				//判读用户是否登录
				var $ = layui.jquery;
					var login = localStorage.getItem("isLogin");
					if(login==="login"){

					}else{
						window.location.href=remoteUrl+'login.html';
						return false;
					}

				   //控制页面权限
                    var user=JSON.parse(sessionStorage.getItem("scs_user"));
                	$("#loginname").html(user.username);
                	$("#loginout").click(logout);
					var roles=user.roles;
					var names=[];
					for (var i=0;i<roles.length;i++){
					    names.push(roles[i].role);
					}
					names.find(function (value) {
						if(value==="老师"){
                            $("#teacherOp").css("display","block");
						}
						if (value==="学生"){
                            $("#studentOp").css("display","block");
                        }
                        if  (value==="超级管理员"){
                            $("#student").css("display","block");
                            $("#teacher").css("display","block");
                            $("#log").css("display","block");
                            $("#department").css("display","block");
                            $("#gradeClass").css("display","block");
                            $("#auth").css("display","block");
                            $("#course").css("display","block");
						}
                    });

			});
			function logout() {
				$.ajax({
					url: remoteUrl+"index/logout",
					type: 'post',//method请求方式，get或者post
					dataType: 'json',//预期服务器返回的数据类型
					contentType: "application/json; charset=utf-8",
					success: function (res) {//res为相应体,function为回调函数
						if (res.status === 200) {
							sessionStorage.removeItem("scs_user");

							window.location.href=remoteUrl+"login.html";
						} else {
							layer.msg(res.message);
						}

					}
				});


			}
		</script>
	</body>
	<!--Tab菜单右键弹出菜单-->
	<ul class="rightMenu" id="rightMenu">
        <li data-type="fresh">刷新</li>
        <li data-type="current">关闭当前</li>
        <li data-type="other">关闭其它</li>
        <li data-type="all">关闭所有</li>
    </ul>

</html>